var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function (req, res, next) {
	Db.Config.findOne({}, function(err, config) {
		if (err) {
			throw err;
		}
		res.render('system/waiter', {
			menus : req.menus,
			title : '服务人员管理',
			config : config,
			sexs : BASE_CONFIG.sexs
		});
	});
});

router.get('/map', function (req, res, next) {
	Db.Config.findOne({}, function(err, config) {
		if (err) {
			throw err;
		}
		res.render('system/waiter_map', {
			menus : req.menus,
			title : '服务人员地图检索',
			config : config,
			sexs : BASE_CONFIG.sexs
		});
	});
});

module.exports = router;
